package com.woniuxy.controller;


import com.woniuxy.commons.model.Result;
import com.woniuxy.controller.form.AddAccountRoleAuthorizationForm;
import com.woniuxy.service.AccountRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author psy
 * @since 2022-06-28
 */
@RestController
@RequestMapping("/accountRole")
@Api(tags = "后台账号角色基本操作接口")
public class AccountRoleController {

    @Autowired
    private AccountRoleService accountRoleService;

    /**
     * 超级管理员给账号授权相应角色时的接口
     * @param aaraf
     * @return
     */
    @PostMapping("/addAuthorization")
    @ApiOperation("超级管理员给账号授权相应角色时的接口")
    public Result addAuthorization(@RequestBody AddAccountRoleAuthorizationForm aaraf){

        accountRoleService.addAuthorization(aaraf);


        return Result.success(200,"授权成功",null);
    }

}

